﻿<%@ Page Title="Make Reservation" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="MakeReservation.aspx.cs" Inherits="TravelAgency.AspNet.Users.MakeRegistration" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

        <div class = "top-padding"><h2>Make Reservation</h2></div>
        <asp:Panel ID="PanelTrip" runat="server" CssClass="trip-details" Visible="false">
                <h2><asp:Label runat="server" ID="LabelTripNotAvailable" Text="Trip not available"></asp:Label></h2>        
                <asp:Panel runat="server" ID="PanelTripDetails">

                    <h2>Trip details</h2>

                    <div class="trip-title">
                        <b>Title:</b>
                        <asp:Label ID="LabelTitle" runat="server"></asp:Label>
                    </div>
                    <div class="trip-description">
                        <b>Description:</b>
                        <div class="description">
                            <asp:Label ID="LabelDescription" runat="server"></asp:Label>
                        </div>
                        <div>
                            <b>Start date:</b>
                            <asp:Label runat="server" ID="LabelStartDate"></asp:Label>
                        </div>
                        <div>
                            <b>End date:</b>
                            <asp:Label runat="server" ID="LabelEndDate"></asp:Label>
                        </div>
                        <div>
                            <b>Price:</b>
                            <asp:Label runat="server" ID="LabelPrice"></asp:Label>
                        </div>
                        <div>
                            <b>Capacity:</b>
                            <asp:Label runat="server" ID="LabelCapacity"></asp:Label>
                        </div>
                        
                        <div>
                            <b>Please enter the number of people in the reservation: </b>
                            <asp:TextBox ID="TextBoxPeopleNumber" runat="server"></asp:TextBox>
                            <asp:RequiredFieldValidator
                                ID="RequiredFieldValidatorPeopleNumber" 
                                runat="server" 
                                ErrorMessage="Required field" 
                                ControlToValidate="TextBoxPeopleNumber" ToolTip="Required field" Text="Required field" 
                                Display="Dynamic" CssClass="message-error"></asp:RequiredFieldValidator>

                            <asp:RangeValidator ID="RangeValidatorPeopleNumber" runat="server" 
                                ErrorMessage="Too many or not a number" ControlToValidate="TextBoxPeopleNumber" 
                                MinimumValue="1" Type="Integer" ToolTip="Too many people" Text="Too many or not a number" 
                                Display="Dynamic" CssClass="message-error"></asp:RangeValidator>
                        </div>

                        <div class="link-resevation">                        
                            <asp:LinkButton ID="LinkButtonReservation" runat="server" 
                                Text="Confirm reservation" onclick="LinkButtonReservation_Click"></asp:LinkButton>
                            <asp:Label runat="server" Text=" / "></asp:Label>
                            <asp:LinkButton ID="LinkButtonCancelReservation" runat="server" 
                                CausesValidation="false" Text="Cancel reservation"
                                onclick="LinkButtonCancelReservation_Click"></asp:LinkButton>
                        </div>
                    </div>
                </asp:Panel>        
            </asp:Panel>
            
</asp:Content>

